﻿using System;

class PrintAlphabeticalListOfWords
{
    static void Main()
    {
        //Exercise 24.
        //Write a program that reads a list of words, separated by spaces and prints the list in an alphabetical order.

        string text = "write a program that reads a list of words separated by spaces and prints the list in an alphabetical order";
        string[] words = text.Split(' ');
        Array.Sort(words);
        for (int i = 0; i < words.Length; i++)
        {
            Console.WriteLine(words[i]);
        }        
    }
}

